echo
echo "======make release ====="
script_name=$0

set -eu
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

# default values:
build_platform="NX"
echo "build platform: " $build_platform

rm -rf build_nx
mkdir build_nx
cd build_nx
rm -rf *

cmake -DCMAKE_BUILD_TYPE=release \
    -DCMAKE_TOOLCHAIN_FILE="${SCRIPT_DIR}/cmake/JestonNx93ToolChain.cmake" \
    ${SCRIPT_DIR}

make -j $(python3 -c 'import multiprocessing as mp; print(int(mp.cpu_count()*1))')
